package org.mybatis.example;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zhouchaoqun
 * @date 2018/10/18 下午4:49
 */
@Mapper
public interface BlogMapper extends BaseMapper<Blog> {

    @Select("select * from test where id = #{id}")
    Blog selectById(Integer id);

    int insertBatch(List<String> list);

    @Insert("insert into test(`name`) values(#{name})")
    int insert(String name);
}
